<%= error_messages_for 'client' %>

<!--[form:client]-->
<table cellpadding=5 cellspacing= border=0 width=100%>
<tr>
<td><label for="client_client_group_id">Client Group</label>
</td>
<td>
<% @groups = ClientGroup.find(:all, :order => "name" ).map {|u| [u.name, u.id]}%>
<%= select 'client', 'client_group_id', @groups %>	
</td>
</tr>
<tr>
<td><label for="client_client_since">Client since</label><br/>
</td>
<td>
<%= date_select 'client', 'client_since'  %></p>
</td>
</tr>
<tr>
<td><label for="client_status">Status</label>
</td>
<td>
<%= select 'client', 'status', 
Client::STATUS,{},{:onchange => "if(options[selectedIndex].value == 'P') {Element.show('individual'); Element.hide('other'); return false;}else{Element.hide('individual'); Element.show('other'); return false;}"}
%></td>
</tr>
<div id="individual" style="display : none;">
<tr><td colspan=2><h1>Individual Information</h1></td></tr>
<tr>
<td><label for="client_salutation">Name</label>
</td>
<td>
<%= select 'client', 'salutation', Client::SALUTATION  %>
<label for="client_first_name">&nbsp;</label>
<%= text_field 'client', 'first_name', { :size => '10'}  %>
<label for="client_middle_name">&nbsp;</label>
<%= text_field 'client', 'middle_name', { :size => '10'} %>
<label for="client_laat_name">&nbsp;</label>
<%= text_field 'client', 'laat_name', { :size => '10'}  %></p>
</td>
</tr>
<tr>
<td><label for="client_fathers_salutation">Fathers Name</label>
</td>
<td>
<%= select 'client', 'fathers_salutation', Client::SALUTATION  %>
<label for="client_fathers_first_name">&nbsp;</label>
<%= text_field 'client', 'fathers_first_name', { :size => '10'}  %>
<label for="client_fathers_middle_name">&nbsp;</label>
<%= text_field 'client', 'fathers_middle_name', { :size => '10'} %>
<label for="client_fathers_laat_name">&nbsp;</label>
<%= text_field 'client', 'fathers_laat_name', { :size => '10'}  %></p>
</td>
</tr>
<tr>
<td><label for="client_husbands_salutation">Husbands Name</label>
</td>
<td>
<%= select 'client', 'husbands_salutation', Client::SALUTATION  %>
<label for="client_husbands_first_name">&nbsp;</label>
<%= text_field 'client', 'husbands_first_name', { :size => '10'}  %>
<label for="client_husbands_middle_name">&nbsp;</label>
<%= text_field 'client', 'husbands_middle_name', { :size => '10'} %>
<label for="client_husbands_laat_name">&nbsp;</label>
<%= text_field 'client', 'husbands_laat_name', { :size => '10'}  %></p>
</td>
</tr>
<tr>
<td><label for="client_gender">Gender</label><br/>
</td>
<td>
<%= select 'client', 'gender', Client::GENDER %>
</td>
</tr>
<tr>
<td><label for="client_date_of_birth">Date of birth</label>
</td>
<td>
<%= date_select 'client', 'date_of_birth'  %>
</td>
</tr>

<tr>
<td><label for="client_married">Married</label>
</td>
<td>
<select id="client_married" name="client[married]"><option value="false" selected>False</option><option value="true">True</option></select>
</td>
</tr>
<tr>
<td><label for="client_date_of_marriage">Date of marriage</label>
</td>
<td>
<%= date_select 'client', 'date_of_marriage'  %>
</td>
</tr>
</div>
<div id="other" style="display : none;">
<tr><td colspan=2><h1>Organization Information</h1></td></tr>
<tr>
<td><label for="client_firm_name">Firm name</label><br/>
</td>
<td>
<%= text_field 'client', 'firm_name'  %>
</td>
</tr>
<tr>
<td><label for="client_date_of_incorporation">Date of incorporation</label>
</td>
<td>
<%= date_select 'client', 'date_of_incorporation'  %>
</td>
</tr>
<tr>
<td>
<label for="client_authorized_person_salutation">Authorized person</label></td>
<td>
<%= select 'client', 'authorized_person_salutation', Client::SALUTATION  %>
<label for="client_authorized_person_first_name">&nbsp;</label>
<%= text_field 'client', 'authorized_person_first_name', { :size => '10'}  %>
<label for="client_authorized_person_midle_name">&nbsp;</label>
<%= text_field 'client', 'authorized_person_midle_name', { :size => '10'} %>
<label for="client_authorized_person_laat_name">&nbsp;</label>
<%= text_field 'client', 'authorized_person_laat_name', { :size => '10'}  %></p>
</td>
</tr>
</div>
<tr><td colspan=2><h1>Office Address</h1></td></tr>
<tr>
<td><label for="client_office_add_1">Address 1</label>
</td>
<td>
<%= text_field 'client', 'office_add_1'  %>
</td>
</tr>
<tr>
<td><label for="client_office_add_2">Address 2</label>
</td>
<td>
<%= text_field 'client', 'office_add_2'  %>
</td>
</tr>
<tr>
<td><label for="client_office_city">city</label>
</td>
<td>
<%= text_field 'client', 'office_city', { :size => '10'}  %>
<label for="client_office_state">State</label>
<%= text_field 'client', 'office_state', { :size => '10'}  %>
<label for="client_office_pin">Pin</label>
<%= text_field 'client', 'office_pin', { :size => '10'}  %>
</td>
</tr>
<tr><td colspan=2><h1>Residential Address</h1></td></tr>
<tr>
<td><label for="client_residential_add_1">Address 1</label>
</td>
<td>
<%= text_field 'client', 'residential_add_1'  %>
</td>
</tr>
<tr>
<td><label for="client_residential_add_2">Address 2</label>
</td>
<td>
<%= text_field 'client', 'residential_add_2'  %>
</td>
</tr>
<tr>
<td><label for="client_residential_city">city</label>
</td>
<td>
<%= text_field 'client', 'residential_city', { :size => '10'}  %>
<label for="client_residential_state">State</label>
<%= text_field 'client', 'residential_state', { :size => '10'}  %>
<label for="client_residential_pin">Pin</label>
<%= text_field 'client', 'residential_pin', { :size => '10'}  %>
</td>
</tr>
<tr><td colspan=2><h1>Tax Information</h1></td></tr>

<tr>
<td>
<label for="client_pan">Pan</label>
</td>
<td>
<%= text_field 'client', 'pan'  %>
</td>
</tr>

<tr>
<td>
<label for="client_tan">Tan</label>
</td>
<td>
<%= text_field 'client', 'tan'  %>
</td>
</tr>

<tr>
<td>
<label for="client_industry">Industry</label>
</td>
<td>
<%= text_field 'client', 'industry'  %>
</td>
</tr>

<tr>
<td>
<label for="client_it_ward_juridiction">IT Ward Juridiction</label></td>
<td>
<%= text_field 'client', 'it_ward_juridiction', { :size => '10'}  %>
<label for="client_it_ward_middle">&nbsp;</label>
<%= text_field 'client', 'it_ward_middle', { :size => '10'}  %>
<label for="client_it_ward_code">&nbsp;</label>
<%= text_field 'client', 'it_ward_code', { :size => '10'}  %>
</td>
</tr>

<tr>
<td>
<label for="client_bank">Bank</label>
</td>
<td>
<%= text_field 'client', 'bank'  %>
</td>
</tr>

<tr>
<td>
<label for="client_bank_account_type">Bank account type</label>
</td>
<td>
<%= text_field 'client', 'bank_account_type'  %>
</td>
</tr>

<tr>
<td>
<label for="client_bank_account_no">Bank account no</label></td>
<td>
<%= text_field 'client', 'bank_account_no'  %>
</td>
</tr>

</table>

<p><label for="client_office_add_same_as_client">Office add same as client</label><br/>
<select id="client_office_add_same_as_client" name="client[office_add_same_as_client]"><option value="false" selected>False</option><option value="true">True</option></select></p>

<p><label for="client_residential_add_same_as_client">Residential add same as client</label><br/>
<select id="client_residential_add_same_as_client" name="client[residential_add_same_as_client]"><option value="false" selected>False</option><option value="true">True</option></select></p>

<p><label for="client_same_residential_office_address">Same residential office address</label><br/>
<select id="client_same_residential_office_address" name="client[same_residential_office_address]"><option value="false" selected>False</option><option value="true">True</option></select></p>
<!--[eoform:client]-->

